import * as PIXI from 'pixi.js'
import { useWindowSize } from '@vueuse/core'
import useMainStore from '@/store/modules/useMainStore'

export default () => {
  const { width, height } = useWindowSize()
  const mainStore = useMainStore()
  const modalRect = new PIXI.Graphics()
  const { scale } = mainStore.getAppAttr
  modalRect.rect(0, 0, width.value / scale, height.value / scale).fill({
    color: 0x000000,
    alpha: 0.7,
  })
  const container = new PIXI.Container()
  container.addChild(modalRect)
  return container
}
